﻿using UnityEngine;
using System.Collections;

namespace Tool
{
    public class ScreenEffectTool : MonoBehaviour
    {
        static private ScreenEffectTool inst;
        static public ScreenEffectTool Instance
        {
            get
            {
                return inst;
            }
        }
        public GameObject effect;
        public float effectTime=1f;
        void Awake()
        {
            inst = this;
            effect.SetActive(false);
        }

        public void OnClick0(Vector3 pos)
        {
            GameObject obj = GameObject.Instantiate(effect);
            obj.SetActive(true);
            obj.transform.SetParent(transform);
            obj.transform.position = pos;
            obj.transform.localScale = Vector3.one;
            
            Destroy(obj, effectTime);
        }
        
    }


}